package demo.xlj.yuyi.studentapp.retrofit;

import demo.xlj.yuyi.studentapp.bean.AddHuoDongBean;
import demo.xlj.yuyi.studentapp.bean.AllowShenQingBean;
import demo.xlj.yuyi.studentapp.bean.CollcetionSheTuanBean;
import demo.xlj.yuyi.studentapp.bean.GetNoticeBean;
import demo.xlj.yuyi.studentapp.bean.HaveSheTuan;
import demo.xlj.yuyi.studentapp.bean.LoginBean;
import demo.xlj.yuyi.studentapp.bean.LookHuoDongBean;
import demo.xlj.yuyi.studentapp.bean.MyDelInfoBean;
import demo.xlj.yuyi.studentapp.bean.NoticeBean;
import demo.xlj.yuyi.studentapp.bean.RegisterBean;
import demo.xlj.yuyi.studentapp.bean.ShowHuoDongForAllBean;
import demo.xlj.yuyi.studentapp.bean.TongZhiNewBean;
import io.reactivex.Flowable;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by whstywh on 2017/4/5 0005
 * GitHub：https://github.com/whstywh
 * email：whstywh@163.com
 * description：API
 */

public interface ApiService {


//    @GET("341-1")
//    Flowable<BemA> test();

    //    注册接口
    @GET("addUser")
    Flowable<RegisterBean> addUser(@Query("userid") String userid,
                                   @Query("password") String password,
                                   @Query("username") String username,
                                   @Query("identity") String identity);

    //登录接口
    @GET("login")
    Flowable<LoginBean> loginUser(@Query("userid") String name,
                                  @Query("password") String password);

    //发布通知
    @GET("addNotice")
    Flowable<NoticeBean> addNotice(@Query("title") String title,
                                   @Query("organization") String organization,
                                   @Query("content") String content,
                                   @Query("time") String time,
                                   @Query("uid") String uid,
                                   @Query("type") String type);

    //获取公告
    @GET("getNotice")
    Flowable<GetNoticeBean> getNotice();

    //获取通知，type 表示不同的分类
    @GET("getNoticeByIdentity")
    Flowable<TongZhiNewBean> getTypeNotice(@Query("userIdentity") String type);

    //查看自己的通知
    @GET("getOnceNotice")
    Flowable<TongZhiNewBean> haveMyNotice(@Query("uid") String uid);





    //获取社团信息
    @GET("getAssociation")
    Flowable<HaveSheTuan> getSheTuan();


    //用户收藏社团
    @GET("userCollection")
    Flowable<CollcetionSheTuanBean> collcetionSheTuan(@Query("uid") String uid,
                                                      @Query("aid") String aid);


    //用户取消收藏社团
    @GET("DelUserConllection")
    Flowable<CollcetionSheTuanBean> deleteCollcetionShetuan(@Query("uid") String uid,
                                                            @Query("aid") String aid);

    //用户获取自己感兴趣的社团
    @GET("LookMyCollection")
    Flowable<HaveSheTuan> getCollectionSheTuan(@Query("uid") String uid);


    //申请活动
    @GET("addActive")
    Flowable<AddHuoDongBean> addHuoDong(@Query("content") String content,
                                        @Query("addr") String addr,
                                        @Query("undertake") String undertask,
                                        @Query("time") String time,
                                        @Query("userid") String userid);

    //删除活动
    @GET("delMyActive")
   Flowable<MyDelInfoBean> delAll(@Query("aid") String aid);


    //查看活动申请情况
    @GET("lookActivityByUser")
    Flowable<LookHuoDongBean> lookHuoDongForSheTuan(@Query("userid") String userid);


    //获取审核的活动
    @GET("getActivityone")
    Flowable<LookHuoDongBean> LookHuoDong(@Query("identity") String identity);


    //批准活动
    @GET("handleActivity")
    Flowable<AllowShenQingBean> allowShenQing(@Query("aid") String aid,
                                              @Query("identity") String identity
                                              );

    //不批准活动
    @GET("handleActivityNot")
    Flowable<AllowShenQingBean> NotShenQing(@Query("aid") String aid,
                                            @Query("identity") String identity,
                                            @Query("reason") String reason);

    //查看公开的活动
    @GET("showActivity")
    Flowable<ShowHuoDongForAllBean> showHuoDong();


}
